1. Technical Field
The present invention relates generally to a high-speed floating-point adder (adder) and, more particularly, to the improvement of some of the most time critical elements that exist in the adder, such as the end-around-carry-logic.
2. Description of the Related Art
Floating-Point Units (FPU) are well known, and have been an element of computer architecture for a number of years. However, such calculations, while useful, are intensive and require extensive computing power. Generally, a floating-point number consists of three components: a sign bit, exponent, and mantissa. Addition, subtraction, multiplication, and division operations occur through the manipulation of bits via the use of the bits and the bits' 1's and 2's complements. Here, the concern is more with the use of the End-Around-Carry Principle specifically regarding the operations of multiply-add and multiply-subtract.
A method, well-known in the art, is utilized to perform the multiply-add and multiply-subtract operations in a base 2 system. The addend is aligned so as to properly orient the digits of the fraction of product and addend to their corresponding order of magnitude or properly orient the bits to their corresponding weights. The process of alignment, thus, converts the fraction of the addend into a number that is 4n+2 bits long, where n bits are the addend and the remaining 3n+2 bits are 0. During the process of alignment, the addend is further subdivided into three constituent vectors, which correspond as follows: A corresponds to most significant n bits, B corresponds to the middle 2n+2 bits, and C corresponds to the least significant n bits. The variable for a floating point calculation are as follows: COUT is the carry-out bit, P is the product, A represents the most significant n bits of the addend, B represents the middle 2n+2 bits, and C represents the least significant n bits, which are compressed into sticky bit (sticky). The calculation is as follows:Addend D=(A*2(2n+2)+B+0.5*sticky)  (1)Let sum0+(2(2n+2))COUT=B+P  (2)Let A′=A+COUT  (3)For an effective addition (for example, a multiply-add where product and addend have like signs, or a multiply-subtract where product and addend have different signs)R=P+D=(2(2n+2))A′+sum0+0.5sticky  (4)For an effective subtractionR=abs(P−D)  (5)Let sum0′+2(2n+2)*cout′=(!B+P)  (6)Let A′=(!A+cout′)modulo 2n  (7)If in Equation 5, the product is larger than the addend, for example, P>D, thenR=P−D=(2(2n+2))A′+sum0′+!sticky*0.5+0.5  (8)If in Equation 5, the product is smaller than the addend, for example, P<D, thenR=−(P−D)=!A′*2(2n+2)+!sum0″+sticky*0.5  (9)
The end-around carry does not immediately follow from the above calculations. However, the above calculations illustrate the end-around-carry principle process. For computing abs(P−D), one computes R=P+!D and adds the carry-out to the result as carry-in R′=R+0.5*cout. Also, depending on the carry-out, R′ can be negated. The selection between the use of Equation 8 and Equation 9 is dependent on the value of the carry out bit (COUT) of Equation 6. If COUT=1, then Equation 8 applies. However, for COUT=0, Equation 9 applies. In other words, the calculation for the operation of subtraction hinges on the greater of the two terms. This calculation, though, can be cumbersome and difficult.
Therefore, there is a need for a method and/or apparatus to streamline each of the processes that make both evaluations and calculations that address at least some of the problems associated with conventional methods and apparatuses for floating point computations.